package com.gisocn.onemap.greendao;

import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import com.gisocn.onemap.model.OfflineDownLoadFileInfo;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseStatement;
import org.greenrobot.greendao.internal.DaoConfig;

/* loaded from: classes.dex */
public class OfflineDownLoadFileInfoDao extends AbstractDao<OfflineDownLoadFileInfo, Long> {
    public static final String TABLENAME = "OFFLINE_DOWN_LOAD_FILE_INFO";

    /* loaded from: classes.dex */
    public static class Properties {
        public static final Property Id = new Property(0, Long.TYPE, "id", true, "_id");
        public static final Property Type = new Property(1, String.class, "type", false, "TYPE");
        public static final Property Name = new Property(2, String.class, "name", false, "NAME");
        public static final Property Label = new Property(3, String.class, "label", false, "LABEL");
        public static final Property Size = new Property(4, String.class, "size", false, "SIZE");
        public static final Property Version = new Property(5, String.class, "version", false, "VERSION");
        public static final Property CData = new Property(6, String.class, "cData", false, "C_DATA");
        public static final Property VersionDesc = new Property(7, String.class, "versionDesc", false, "VERSION_DESC");
        public static final Property CurrentLength = new Property(8, String.class, "currentLength", false, "CURRENT_LENGTH");
        public static final Property LastModifiedTime = new Property(9, Long.class, "lastModifiedTime", false, "LAST_MODIFIED_TIME");
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final boolean isEntityUpdateable() {
        return true;
    }

    public OfflineDownLoadFileInfoDao(DaoConfig daoConfig) {
        super(daoConfig);
    }

    public OfflineDownLoadFileInfoDao(DaoConfig daoConfig, DaoSession daoSession) {
        super(daoConfig, daoSession);
    }

    public static void createTable(Database database, boolean z) {
        String str = z ? "IF NOT EXISTS " : "";
        database.execSQL("CREATE TABLE " + str + "\"OFFLINE_DOWN_LOAD_FILE_INFO\" (\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ,\"TYPE\" TEXT,\"NAME\" TEXT,\"LABEL\" TEXT,\"SIZE\" TEXT,\"VERSION\" TEXT,\"C_DATA\" TEXT,\"VERSION_DESC\" TEXT,\"CURRENT_LENGTH\" TEXT,\"LAST_MODIFIED_TIME\" INTEGER);");
    }

    public static void dropTable(Database database, boolean z) {
        StringBuilder sb = new StringBuilder();
        sb.append("DROP TABLE ");
        sb.append(z ? "IF EXISTS " : "");
        sb.append("\"OFFLINE_DOWN_LOAD_FILE_INFO\"");
        database.execSQL(sb.toString());
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final void bindValues(DatabaseStatement databaseStatement, OfflineDownLoadFileInfo offlineDownLoadFileInfo) {
        databaseStatement.clearBindings();
        databaseStatement.bindLong(1, offlineDownLoadFileInfo.getId());
        String type = offlineDownLoadFileInfo.getType();
        if (type != null) {
            databaseStatement.bindString(2, type);
        }
        String name = offlineDownLoadFileInfo.getName();
        if (name != null) {
            databaseStatement.bindString(3, name);
        }
        String label = offlineDownLoadFileInfo.getLabel();
        if (label != null) {
            databaseStatement.bindString(4, label);
        }
        String size = offlineDownLoadFileInfo.getSize();
        if (size != null) {
            databaseStatement.bindString(5, size);
        }
        String version = offlineDownLoadFileInfo.getVersion();
        if (version != null) {
            databaseStatement.bindString(6, version);
        }
        String cData = offlineDownLoadFileInfo.getCData();
        if (cData != null) {
            databaseStatement.bindString(7, cData);
        }
        String versionDesc = offlineDownLoadFileInfo.getVersionDesc();
        if (versionDesc != null) {
            databaseStatement.bindString(8, versionDesc);
        }
        String currentLength = offlineDownLoadFileInfo.getCurrentLength();
        if (currentLength != null) {
            databaseStatement.bindString(9, currentLength);
        }
        Long lastModifiedTime = offlineDownLoadFileInfo.getLastModifiedTime();
        if (lastModifiedTime != null) {
            databaseStatement.bindLong(10, lastModifiedTime.longValue());
        }
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final void bindValues(SQLiteStatement sQLiteStatement, OfflineDownLoadFileInfo offlineDownLoadFileInfo) {
        sQLiteStatement.clearBindings();
        sQLiteStatement.bindLong(1, offlineDownLoadFileInfo.getId());
        String type = offlineDownLoadFileInfo.getType();
        if (type != null) {
            sQLiteStatement.bindString(2, type);
        }
        String name = offlineDownLoadFileInfo.getName();
        if (name != null) {
            sQLiteStatement.bindString(3, name);
        }
        String label = offlineDownLoadFileInfo.getLabel();
        if (label != null) {
            sQLiteStatement.bindString(4, label);
        }
        String size = offlineDownLoadFileInfo.getSize();
        if (size != null) {
            sQLiteStatement.bindString(5, size);
        }
        String version = offlineDownLoadFileInfo.getVersion();
        if (version != null) {
            sQLiteStatement.bindString(6, version);
        }
        String cData = offlineDownLoadFileInfo.getCData();
        if (cData != null) {
            sQLiteStatement.bindString(7, cData);
        }
        String versionDesc = offlineDownLoadFileInfo.getVersionDesc();
        if (versionDesc != null) {
            sQLiteStatement.bindString(8, versionDesc);
        }
        String currentLength = offlineDownLoadFileInfo.getCurrentLength();
        if (currentLength != null) {
            sQLiteStatement.bindString(9, currentLength);
        }
        Long lastModifiedTime = offlineDownLoadFileInfo.getLastModifiedTime();
        if (lastModifiedTime != null) {
            sQLiteStatement.bindLong(10, lastModifiedTime.longValue());
        }
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // org.greenrobot.greendao.AbstractDao
    public Long readKey(Cursor cursor, int i) {
        return Long.valueOf(cursor.getLong(i + 0));
    }

    /* JADX WARN: Can't rename method to resolve collision */
    @Override // org.greenrobot.greendao.AbstractDao
    public OfflineDownLoadFileInfo readEntity(Cursor cursor, int i) {
        long j = cursor.getLong(i + 0);
        int i2 = i + 1;
        String string = cursor.isNull(i2) ? null : cursor.getString(i2);
        int i3 = i + 2;
        String string2 = cursor.isNull(i3) ? null : cursor.getString(i3);
        int i4 = i + 3;
        String string3 = cursor.isNull(i4) ? null : cursor.getString(i4);
        int i5 = i + 4;
        String string4 = cursor.isNull(i5) ? null : cursor.getString(i5);
        int i6 = i + 5;
        String string5 = cursor.isNull(i6) ? null : cursor.getString(i6);
        int i7 = i + 6;
        String string6 = cursor.isNull(i7) ? null : cursor.getString(i7);
        int i8 = i + 7;
        String string7 = cursor.isNull(i8) ? null : cursor.getString(i8);
        int i9 = i + 8;
        int i10 = i + 9;
        return new OfflineDownLoadFileInfo(j, string, string2, string3, string4, string5, string6, string7, cursor.isNull(i9) ? null : cursor.getString(i9), cursor.isNull(i10) ? null : Long.valueOf(cursor.getLong(i10)));
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public void readEntity(Cursor cursor, OfflineDownLoadFileInfo offlineDownLoadFileInfo, int i) {
        offlineDownLoadFileInfo.setId(cursor.getLong(i + 0));
        int i2 = i + 1;
        offlineDownLoadFileInfo.setType(cursor.isNull(i2) ? null : cursor.getString(i2));
        int i3 = i + 2;
        offlineDownLoadFileInfo.setName(cursor.isNull(i3) ? null : cursor.getString(i3));
        int i4 = i + 3;
        offlineDownLoadFileInfo.setLabel(cursor.isNull(i4) ? null : cursor.getString(i4));
        int i5 = i + 4;
        offlineDownLoadFileInfo.setSize(cursor.isNull(i5) ? null : cursor.getString(i5));
        int i6 = i + 5;
        offlineDownLoadFileInfo.setVersion(cursor.isNull(i6) ? null : cursor.getString(i6));
        int i7 = i + 6;
        offlineDownLoadFileInfo.setCData(cursor.isNull(i7) ? null : cursor.getString(i7));
        int i8 = i + 7;
        offlineDownLoadFileInfo.setVersionDesc(cursor.isNull(i8) ? null : cursor.getString(i8));
        int i9 = i + 8;
        offlineDownLoadFileInfo.setCurrentLength(cursor.isNull(i9) ? null : cursor.getString(i9));
        int i10 = i + 9;
        offlineDownLoadFileInfo.setLastModifiedTime(cursor.isNull(i10) ? null : Long.valueOf(cursor.getLong(i10)));
    }

    /* JADX INFO: Access modifiers changed from: protected */
    @Override // org.greenrobot.greendao.AbstractDao
    public final Long updateKeyAfterInsert(OfflineDownLoadFileInfo offlineDownLoadFileInfo, long j) {
        offlineDownLoadFileInfo.setId(j);
        return Long.valueOf(j);
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public Long getKey(OfflineDownLoadFileInfo offlineDownLoadFileInfo) {
        if (offlineDownLoadFileInfo != null) {
            return Long.valueOf(offlineDownLoadFileInfo.getId());
        }
        return null;
    }

    @Override // org.greenrobot.greendao.AbstractDao
    public boolean hasKey(OfflineDownLoadFileInfo offlineDownLoadFileInfo) {
        throw new UnsupportedOperationException("Unsupported for entities with a non-null key");
    }
}
